import requests from '@/api/request'
// const SERVER_URL = ''
export default {
  // 查询
  postQueryLoanData (data) {
    return requests({
      url: `/v1/api/case/case/basic/queryByCondition`,
      method: 'post',
      data
    })
  },
  // 通过ID查询申请件基本信息
  getBasicInfoData (data) {
    return requests({
      url: `/v1/api/case/case/basic/queryById/${data}`,
      method: 'get'
    })
  },
  // 通过caseId查询申请件预批结果
  getPreApprovalData (data) {
    return requests({
      url: `/v1/api/case/case/pre/result/queryByCaseId/${data}`,
      method: 'get'
    })
  },
  // 通过caseId查询申请件流转记录
  getFlowRecordData (data) {
    return requests({
      url: `/v1/api/case/case/flow/queryByCaseId/${data}`,
      method: 'get'
    })
  },
  // 通过caseId查询申请件跟进记录
  getFollowRecordData (data) {
    return requests({
      url: `/v1/api/case/case/follow/queryByCaseId/${data}`,
      method: 'get'
    })
  },
  // 通过caseId查询申请件客户信息
  getCustomerData (data) {
    return requests({
      url: `/v1/api/case/case/customer/queryByCaseId/${data}`,
      method: 'get'
    })
  },
  // 通过caseId查询申请件职业信息
  getCareerData (data) {
    return requests({
      url: `/v1/api/case/case/career/queryByCaseId/${data}`,
      method: 'get'
    })
  },
  // 通过caseId查询申请件联系人信息
  getContactData (data) {
    return requests({
      url: `/v1/api/case/case/contact/queryByCaseId/${data}`,
      method: 'get'
    })
  },
  // 通过caseId查询申请件跟进记录
  getFollowData (data) {
    return requests({
      url: `/v1/api/case/case/follow/queryByCaseId/${data}`,
      method: 'get'
    })
  },
  // 通过caseId查询申请件审批记录
  getAuditData (data) {
    return requests({
      url: `/v1/api/case/case/audit/queryByCaseId/${data}`,
      method: 'get'
    })
  },
  // 通过caseId查询申请件最新审批记录
  getLatestAuditData (data) {
    return requests({
      url: `/v1/api/case/case/audit/queryLatestByCaseId/${data}`,
      method: 'get'
    })
  },
  // 审批保存
  postSaveAuditData (data) {
    return requests({
      url: `/v1/api/case/case/audit/save`,
      method: 'post',
      data
    })
  },
  // 审批提交
  postSubmitAuditData (data) {
    return requests({
      url: `/v1/api/case/case/audit/submit`,
      method: 'post',
      data
    })
  },
  // 分派
  postCaseAssignData (data) {
    return requests({
      url: `/v1/api/case/case/assign/acceptor`,
      method: 'post',
      data
    })
  },
  // 取消
  postCancelCaseData (data) {
    return requests({
      url: `/v1/api/case/case/basic/cancel`,
      method: 'post',
      data
    })
  },
  // 发起重审
  launchReviewCase (data) {
    return requests({
      url: `/v1/api/case/case/basic/restart/audit`,
      method: 'post',
      data
    })
  },
  // 获取发起重审次数
  getLaunchNum (id) {
    return requests({
      url: `/v1/api/case/case/basic/restart/${id}`,
      method: 'get'
    })
  },
  // 撤回分派
  withdrawAssign (data) {
    return requests({
      url: `/v1/api/case/case/assign/cancel`,
      method: 'post',
      data
    })
  },
  // 获取影像信息
  getImageInfo (data) {
    return requests({
      url: `v1/api/third-party/image/queryByCaseId/${data}`,
      method: 'get'
    })
  },
  // 合同管理分页查询
  contractQueryList (data) {
    return requests({
      url: `/v1/api/case/case/assign/cancel`,
      method: 'post',
      data
    })
  },
  // 合同信息查询接口
  contractQueryInfo (data) {
    return requests({
      url: `/v1/api/case/case/assign/cancel`,
      method: 'post',
      data
    })
  },
  // 根据用户id获取协议
  getContractAll (params) {
    return requests({
      url: `/v1/api/third-party/image/queryContractByCustomerId`,
      method: 'get',
      params
    })
  },
  // 客户申请件最新结果
  queryScheduleFllow (data) {
    return requests({
      url: `/v1/api/case/case/final/result/queryByCaseId`,
      method: 'post',
      data
    })
  },
  // 房抵贷房产信息查询
  queryByCaseId (data) {
    return requests({
      url: `/v1/api/case/house/mortgage/loan/asset/queryByCaseId`,
      method: 'post',
      data
    })
  }
}
